import config from '@/config'
import util from './util'
import store from '@/store'
import tab from './tab'
import theme from './theme'

export default {
	install(Vue) {
		Vue.prototype.$config = config
		Vue.prototype.$util = util
		Vue.prototype.$store = store

		// tab
		Vue.prototype.$switchTab = tab.switchTab

		// 主题控制
		theme.initTheme()
		Vue.prototype.$themeClass = theme.themeClass
		Vue.prototype.$switchTheme = theme.switchTheme
		

		// 引入页面调试 vconsole.js
		if (util.getStorage('require:vconsole')) {
			const vConsole = require('@/libs/vconsole.js')
			new vConsole()
		}
	}
}
